import axios from "../index.js";
// 客户服务

// 故障报修工单  编辑 列表
export const khfwSubmissionList = (data) => {
  return axios.request({
    url: "/emergency/emergencyCustomerOrder/listPage",
    method: "post",
    data: data
  });
};
// 故障报修工单  编辑 删除
export const deletelist = (data) => {
  return axios.request({
    url: "/emergency/emergencyCustomerOrder/deleteById",
    method: "post",
    data: data
  });
};
// 故障报修工单  编辑 修改
export const editlist = (data) => {
  return axios.request({
    url: "/emergency/emergencyCustomerOrder/updById",
    method: "post",
    data: data
  });
};
// 故障报修工单  编辑 详情
export const getinfo = (data) => {
  return axios.request({
    url: "/emergency/emergencyCustomerOrder/getById",
    method: "get",
    data: data
  });
};
// 故障报修工单  编辑 执行反馈
export const getfeedback = (data) => {
  return axios.request({
    url: "/emergency/emergencyCustomerExecutionFeedback/getById",
    method: "get",
    data: data
  });
};
// 故障报修工单  保存
export const khfwFeedbackSave = (data) => {
  return axios.request({
    url: "/emergency/emergencyCustomerOrder/save",
    method: "post",
    data: data
  });
};
// 故障报修工单  提交
export const khfwFeedbacksubmit = (data) => {
  return axios.request({
    url: "/emergency/emergencyCustomerOrder/submit",
    method: "post",
    data: data
  });
};
// 故障报修工单  审核
export const khfwFeedbackapprove = (params) => {
  return axios.request({
    url: "/emergency/emergencyCustomerOrder/approve",
    method: "post",
    params
  });
};
// 故障报修工单  部门下拉框数据
// export const getdepartmentlist = (data) => {
//   return axios.request({
//     url: "/emergency/baseMock/department",
//     method: "get",
//     data: data
//   })
// }
// 故障报修工单  责任人下拉框数据
export const getpersonlist = (data) => {
  return axios.request({
    // url: "/emergency/baseMock/person",

    method: "get",
    data: data
  });
};
// 故障报修工单  响应命令单下拉框数据
// export const getemergencyResponselist = (data) => {
//   return axios.request({
//     url: "/emergency/baseMock/emergencyResponse",
//     method: "get",
//     data: data
//   })
// }
// 故障报修工单  任务类型下拉框数据
// export const gettaskTypelist = (data) => {
//   return axios.request({
//     url: "/emergency/dict/getDictByGroup",
//     method: "get",
//     data: data
//   })
// }

// 首页统计左侧恢复率
export const getIndexRecoverApi = (data) => {
  return axios.request({
    url: "/emergency/emergencyOutageInformation/statistics",
    method: "get",
    data
  });
};

// 首页底部重要用户表
export const getImpUsersApi = (data) => {
  return axios.request({
    url: "/emergency/emergencyCustomerOrder/getImpUsers",
    method: "get",
    data
  });
};

// 首页更多重要用户表
export const getImpUsersMoreApi = (data) => {
  return axios.request({
    url: "/emergency/emergencyCustomerOrder/getAllUsers",
    method: "post",
    data
  });
};

// 客户服务 首页 饼图
export const getPieApi = (data) => {
  return axios.request({
    url: "/emergency/emergencyCustomerOrder/getPie",
    method: "get",
    data
  });
};
